extends mixins/_layout
block content
    body
        // 头部
        include mixins/_header.jade
        .main-content
            .fix-thumb
                img(src='./images/box_2.png?thumb=4_1')
                .promoWD
                    include mixins/banner.jade
            // 标签卡
            .edu-white-bg.row-margin-bottom.home-card
                .container
                    .card.pointer
                        .c-pic
                            span.t_1
                        .instructions
                            h3.edu-blue-c 省心.省力
                            p.edu-gray2-c.no-margin-bottom
                                | 从代报名到培训
                                br
                                | 提供一站式服务
                        .index-v-line
                    .card.pointer
                        .c-pic
                            span.t_2
                        .instructions
                            h3.edu-blue-c 专注.优质
                            p.edu-gray2-c.no-margin-bottom
                                | 专注职业培训服务
                                br
                                | 已积累2万技术问题
                        .index-v-line
                    .card.pointer
                        .c-pic
                            span.t_3
                        .instructions
                            h3.edu-blue-c 专业.服务
                            p.edu-gray2-c.no-margin-bottom
                                | 专业老师24H实时答疑
                                br
                                | 全程一对一贴心服务
                        .index-v-line
                    .card.pointer
                        .c-pic
                            span.t_4
                        .float2left.instructions
                            h3.edu-blue-c 保障.VIP
                            p.edu-gray2-c.no-margin-bottom
                                | 技能培训
                                br
                                | 直托平台VIP报名通道
                        
            // 特种作业证
            .row-margin-bottom
                .container.index-bk-work
                    .professional-work
                            h3.nomargin.pointer.float2left 特种作业操作证
                    .professional-labels
                    .row.bk-work-row
                        .bk-bg
                            img(src="/images/bk_2.png" alt="特种作业操作证")
                        .info_v 
                            .row    
                                each item in CasesArr_1
                                    .col-xs-6
                                        .special-work
                                            .fix-thumb
                                                div.cutting
                                                    a(href='/courses/detail?id=#{item.id}', target='_blank')
                                                        img.hover-opacity.cover(src='#{item.imgPath}', alt='')
                                            .info
                                                a.nomargin.float2left(href='/courses/detail?id=#{item.id}', target='_blank') #{item.title}
                                                <div class="institutions">鉴定：#{item.appraisal}</div>
                                                .special-labels.clear
                                                    each _item in item.tag.split(',')
                                                        if _item
                                                            div #{_item}
            // 职业资格证
            .row-margin-bottom
                .container.index-bk-work
                    .professional-work
                        small.float2right
                            a(href='/courses?id=2', target='_blank') 更多
                        h3.nomargin.pointer.float2left 职业资格证
                        p.float2left
                            each item,key in CasesArr_2
                                if key < 8
                                    a(href='/courses/detail?id=#{item.id}', target='_blank') #{item.title}
                    .row.bk-work-row
                        .bk-bg
                            img(src="/images/_bk_bg.png" alt="职业资格证")
                        .row.mr(style="overflow:hidden;height:505px;")
                            div(style="margin-top:12px")
                                each item,key in CasesArr_2
                                    if key < 7
                                        .col(style="margin:0 10px 10px;float:left;width:209px;")
                                            .fix-thumb
                                                div
                                                    a(href='/courses/detail?id=#{item.id}', target='_blank')
                                                        img(src='#{item.imgPath}', alt='', width='100%;height:100%;')
                                                    .overlap.course-card-caption
                                                        a.nomargin(href='/courses/detail?id=#{item.id}', target='_blank') #{item.title}
                                                        p
                                                            each _item in item.tag.split(',')
                                                                a(href='/courses/detail?id=#{item.id}', target='_blank') #{_item}

                      
            // 建筑类考证
            .row-margin-bottom
                .container.index-bk-work
                    .professional-work
                        small.float2right
                            a(href='/courses?id=2', target='_blank') 更多
                        h3.nomargin.pointer.float2left 建筑类培训
                    .row.bk-work-row
                        .bk-bg
                            img(src="/images/bk_1.png" alt="建筑类培训")
                        .info_v    
                            .row.mr    
                                each item in CasesArr_3
                                    .col-xs-6
                                        .special-work
                                            .fix-thumb
                                                div.cutting
                                                    a(href='/courses/detail?id=#{item.id}', target='_blank')
                                                        img.cover.hover-opacity(src='#{item.imgPath}', alt='')
                                            .info
                                                a.nomargin(href='/courses/detail?id=#{item.id}', target='_blank') #{item.title}
                                                .special-labels.clear
                                                    each _item in item.tag.split(',')
                                                        div #{_item}

            // 新闻资讯
            .row-margin-bottom
                .container.index-bk-work
                    .professional-work
                        small.float2right
                            a(href='/courses?id=2', target='_blank') 更多
                        h3.nomargin.pointer.float2left 最新资讯
                    .row.bk-work-row(style="padding-bottom:0;")
                        .news_right.announcement
                                h4
                                    a(href='./NewsList', target='_blank')
                                        | 行业资讯
                                .separated-line
                                each item,key in news_2
                                    .announcement-list(class="#{key == 0?'center':''}")
                                        span.ellipsis
                                            if key != 0
                                                i.active
                                            a(href='/news/detail?tid=#{item.typeId}&id=#{item.id}', target='_blank') #{item.tilte}
                                        if key == 0
                                            a(href='/news/detail?tid=#{item.typeId}&id=#{item.id}', target='_blank')
                                                img(src='#{item.thumbnail}', style='width:70%;height:125px;', alt='')
                        .bk-bg
                            img(src="/images/news_index_bg.png" alt="最新资讯")
                        .info_v(style="width:676px;padding-bottom:24px")
                            div.new_bk
                                .professional-work
                                    small.float2right
                                        a(href='/news?id=2', target='_blank') 更多
                                    h3.nomargin.pointer.float2left 最新资讯
                                .list(style="margin-left:-10px")
                                    each item,key in news_1
                                        .col-xs-4
                                            .fix-thumb
                                                div.cutting
                                                    a(href='/news/detail?tid=#{item.typeId}&id=#{item.id}', target='_blank')
                                                        img.hover-opacity.cover(src='#{item.thumbnail}', alt='')
                                                .overlap.course-card-caption
                                                    a.nomargin.ellipsis(href='/courses/detail?id=#{item.id}', target='_blank',style="font-size:16px;padding-bottom:10px;") #{item.title}
                            div.new_bk
                                .professional-work
                                    small.float2right
                                        a(href='/news?tid=98', target='_blank') 更多
                                    h3.nomargin.pointer.float2left 政策法规
                                .list(style="margin-left:-10px;")
                                    each item,key in news_3
                                        .col-xs-4
                                            .fix-thumb
                                                div.cutting
                                                    a(href='/news/detail?tid=#{item.typeId}&id=#{item.id}', target='_blank')
                                                        img.hover-opacity.cover(src='#{item.thumbnail}', alt='')
                                                .overlap.course-card-caption
                                                    a.nomargin.ellipsis(href='/courses/detail?id=#{item.id}', target='_blank',style="font-size:16px;padding-bottom:10px;") #{item.title}


            // 合作伙伴
            .row
                .container.index-bk-work(style="background:none")
                    .professional-work(style="background-color:#fff")
                        small.float2right
                        h3.nomargin.pointer.float2left 合作伙伴
                    .partner(style="background-color:#fff")
                        div
                            .partner-container
                                each item in partnersList
                                    img(src='#{item.imgPath}', alt='#{item.title}')
                        .leftArrow(onclick='slideTo(-500)')
                            i.icon.icon-chevron-left
                        .rightArrow(onclick='slideTo(500)')
                            i.icon.icon-chevron-right
            #activityModal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='activityModalLabel', aria-hidden='true')
                .modal-dialog
                    .modal-content.activity_modal
                        .modal-header
                            .fix-thumb
                                .activity_modal_bg(style='background-image: url(./images/activity_modal_bg_web.png)')
                                    button.close(type='button', data-dismiss='modal')
                                        span(aria-hidden='true')  
                                        span.sr-only  
                                    .form-horizontal
                                        .form-group
                                            span.col-xs-12.control-label.left 您的名字：
                                            .col-xs-12
                                                input.form-control(name='username', lhq-validate="[{required:true, msg:''}]")
                                        .form-group
                                            span.col-xs-12.control-label.left 电话号码：
                                            .col-xs-12
                                                input.form-control(name='phone', lhq-validate="[{required:true, msg:''},{mobile:true, msg:''}]")
                                        .form-group
                                            .col-xs-12.center
                                                button.btn.submitBtn 提交申请
        //底部
        include mixins/_footer.jade
        script.
            function changeNews4(target, ind) {
                $(target).parent().children('a').removeClass('active');
                $(target).addClass('active');
                $('.news4-list').css('top', (-ind * 450) + 'px');
            }
            function slideTo(step) {
                var div = $('.partner .partner-container');
                var w = div.width();
                var ow = div.parent().width();
                var left = +div.css('margin-left').replace(/px/g, '');
                if (step < 0 && left + w == ow) {
                    left = 0;
                }
                else if (step > 0 && left == 0) {
                    left = ow - w;
                }
                else {
                    left += step;
                    if (left + w < ow) left = ow - w;
                    else if (left > 0) left = 0;
                }
                div.animate({'margin-left': left + 'px'});
            }
            $(function () {
                var w = $('#slides .slide:eq(0)').width();
                var positions = new Array();
                $('#slides .slide').each(function (i) {
                    positions[i] = i * 100;
                });
                $('#slides').width((100 * $('#slides .slide').length) + "%");
                $('#slides .slide').css("width", (100 / $('#slides .slide').length) + "%");
                $('#dots ul li a').mouseover(function (e, keepScroll) {
                    $('li.menuItem').removeClass('act').addClass('inact');
                    $(this).parent().addClass('act');
                    var pos = $(this).parent().prevAll('.menuItem').length;
                    $('#slides').stop().animate({marginLeft: -positions[pos] + '%'}, 450);
                    current = pos;
                    e.preventDefault();
                    //if(!keepScroll) clearInterval(itvl);
                });

                $('#dots ul li.menuItem:first').addClass('act').siblings().addClass('inact');
                var current = 1;

                function autoAdvance() {
                    if (current == -1) return false;
                    $('#dots ul li a').eq(current % $('#dots ul li a').length).trigger('mouseover', [true]);
                    current++;
                }

                var changeEvery = 15;
                var itvl = setInterval(function () {
                    autoAdvance()
                }, changeEvery * 200);//设置自动播放时间，越大越慢
            });